package com.kkyy.findmusic.service.impl;

import com.kkyy.findmusic.dao.BannersDao;
import com.kkyy.findmusic.entity.BannersEntity;
import com.kkyy.findmusic.service.BannersService;
import com.baomidou.mybatisplus.core.conditions.query.QueryWrapper;
import com.baomidou.mybatisplus.extension.service.impl.ServiceImpl;
import org.apache.ibatis.annotations.Param;
import org.springframework.stereotype.Service;
import org.springframework.web.bind.annotation.RequestParam;

import java.util.List;

@Service
public class BannersServiceImpl extends ServiceImpl<BannersDao, BannersEntity> implements BannersService {
    @Override
    public List<BannersEntity> getBanners() {
        List<BannersEntity> banners = this.baseMapper.selectByStatus();
        return banners;
    }

    @Override
    public void delBannerById(Integer id) {
        this.baseMapper.updateBannerStatus(id);
    }

    @Override
    public void addBannerUrl(String url) {
        baseMapper.addBannerUrl(url);
    }
}